#pragma once
#include <iostream>
#include <string>
#include <vector>
using namespace std;

class parserHtml
{
public:
    parserHtml(){};
    ~parserHtml(void);
    
	void doWork();    
	void pushFIFO();
        
    void setPage(const string & _page){m_sHtml = _page;}
    
    void getAllTag();
    void getAllNotTag();
	void getImgTag();
    
    void parserImgTag();
    int forwardImaTag(char * tag,int &);
    int backImaTag(char * tag,int &);
    
    bool checkTag(char * tag);
    bool checkInTag(char* tag,char * ctag);

    int getPosTag(char * tag);
 private:
	string getBody();
	string getUrl();
	bool removeContent();
	string removeTag(char *);

	bool insertDB(string &);

private:
    string m_sHtml;
    vector<string> m_vecUrl;  
    vector<string> m_vTag;  
    vector<string> m_vNotTag; 
	vector<string> m_vImgTag;  
};
